//
//  YWVedioView.h
//  Chinese
//
//  Created by yellow on 2019/6/4.
//  Copyright © 2019 YSLC. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>


NS_ASSUME_NONNULL_BEGIN
@class YWVedioView;

@protocol  YWVedioViewDelegate <NSObject>

@optional
//代理方法
- (void)vedioView:(YWVedioView *)videoView didTapWithTag:(BOOL)isTag;

@end

@interface YWVedioView : UIView

//创建videoPlayView
+ (instancetype)videoView;

//记录cell的位置的
@property (nonatomic, assign) NSInteger index;

/* playItem */
@property (nonatomic, strong) AVPlayerItem *currentItem;

/* 播放器 */
@property (nonatomic, strong) AVPlayer *player;

//播放地址
@property (nonatomic, strong) NSURL *vedioUrl;

//暂停
-(void)pause;

//继续播放
-(void)continueToPlay;

/* 代理 */
@property (nonatomic, weak) id<YWVedioViewDelegate>delegate;

@end

NS_ASSUME_NONNULL_END
